package hom.homwork.java;

public class Htest3 {
    public static void main(String[] args) {
        int[] nums = {23, 43, 53, 23, 34, 48};
        //首尾交换元素的方式，只需要交换数组长度/2的次数
        for (int i = 0; i < nums.length / 2; i++) {

            int temp = nums[i];
            nums[i] = nums[nums.length-1-i];
            nums[nums.length-1-i] = temp;
        }
        for(int num : nums){
            System.out.println(num);
        }
    }
}
